<div>
  <form class="form-horizontal" role="form" novalidate name="myForm" ng-init="initQuery()">
    <div class="form-ctrl md-whiteframe-z1">
      <div class="form-search" style="height:200px;" ng-class="{true: 'shou'}[shoumun.num==0]">
        <div>
          <label style="width:70px">查询条件</label>
          <md-select ng-model="selectDefined" ng-change="setValue()">
            <md-option ng-value="item.queryCode" ng-repeat="item in queries">{{item.queryName}}</md-option>
          </md-select>
        </div>
        <div ng-show="selectDefined==='roleCode'">
          <label>角色编码</label>
          <md-input-container flex  >
          <label>请输入角色编码</label>
            <input type="text" ng-model='param.roleCode'></md-input-container>
        </div>
        <div ng-show="selectDefined==='roleName'">
          <label>角色名称</label>
          <md-input-container flex  >
          <label>请输入角色名称</label>
            <input type="text" ng-model='param.roleName'></md-input-container>
        </div>
        <div ng-show="selectDefined==='creTime'">
          <md-input-container flex  >
            <input  type="date" time-date="param.creTime" name = 'searchTime' ng-model="param.creTime"   required>
               <div ng-messages="myForm.searchTime.$error">
                <div ng-message="date">请正确输入时间</div>
                <div ng-message="too-great">选择时间不能大于当前时间</div>
              </div>
          </md-input-container>
        </div>
      </div> <i class="glyphicon glyphicon-chevron-up shrinkage" ng-show="!btnDisabled" ng-click="shoumun.num=0"></i>
      <md-button ng-disabled="btnDisabled"  ng-click="search()" class="md-fab md-primary md-hue-1" aria-label="Profile"> <i class="glyphicon glyphicon-arrow-down"
      style="margin-top:28px;"  ng-show="shoumun.num==false"></i>
        <i class="glyphicon glyphicon-search" ng-show="shoumun.num==true"></i>
      </md-button>
    </div>
  </form>
  <div class="table-info" ng-show="flag === 'table'">
    <div class="menus">
      <md-button ng-click="next()" class="md-raised">下一步</md-button>
    </div>
    <div>
      <div class="table-detail">
        <div class="t_r">
          <table class="table table-bordered">
            <caption style="text-align:center;font-size:large;font-weight:bold;color:black">{{title}}</caption>
            <thead>
              <tr>
                <td width="10%">选择</td>
                <td width="10%">角色编码</td>
                <td width="10%">角色名称</td>
                <td width="20%">创建时间</td>
                <td>角色说明</td>
              </tr>
            </thead>
            <tbody class="table table-bordered">
              <tr ng-repeat='item in items'>
                <td>
                  <div class="radio-inline">
                    <input id="{{item.roleId}}" type="radio" name="roles" ng-click="selectRole(item)"/>
                    <label for="{{item.roleId}}">选择</label>
                  </div>
                </td>
                <td>{{item.roleCode}}</td>
                <td>{{item.roleName}}</td>
                <td>{{item.creTime}}</td>
                <td>{{item.roleDetail}}</td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
  <div class="form-content" ng-show="flag === 'next'">
    <div layout="column">
      <md-content md-theme="docs-dark" layout-padding layout="row" layout-sm="column" style="padding: 0;">
        <div class="function-medule">
          <div class="medule-title">角色授权</div>
          <div class="medule-myTab"  style="height:480px;">
            <table border="1">
              <tr ng-repeat="root in allModules">
                <td><md-checkbox ng-model="root.checked" ng-change="checkedParent(root)">{{root.moduleName}}</md-checkbox></td>
                <td style="border-right: 1px solid transperent;">
                  <ul class="ul02">
                    <li ng-repeat="child in root.childModule" ng-show="child.moduleId !== 47">
                      <md-checkbox ng-model="child.checked" ng-change="checkedChild(root,child)">{{child.moduleName}}</md-checkbox>
                    </li>
                  </ul>
                </td>
              </tr>
              <tr>
                <td>
                  <md-button ng-click="save()" style="background-color: #FF9800;color:#FFF;">保存</md-button>
                </td>
                <td>
                  <md-button ng-click="reset()" style="background-color: #FF9800;color:#FFF;">重置</md-button>
                </td>
              </tr>
            </table>
          </div>
        </div>
      </md-content>
    </div>
  </div>
</div>
